package com.sdp.wx.db.wx_metering_utensil_detection.entity;

import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import com.baomidou.mybatisplus.extension.activerecord.Model;
import com.fasterxml.jackson.annotation.JsonFormat;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.experimental.Accessors;
import org.springframework.format.annotation.DateTimeFormat;

import java.io.Serializable;
import java.time.LocalDate;

/**
 * <p>
 *
 * </p>
 *
 * @author zsp
 * @since 2024-02-28
 */
@Data
@EqualsAndHashCode(callSuper = false)
@Accessors(chain = true)
@TableName("wx_metering_utensil_detection")
public class WxMeteringUtensilDetection extends Model<WxMeteringUtensilDetection> {

    private static final long serialVersionUID=1L;

    /**
     * 内码
     */
    @TableId("key_id")
    private String keyId;

    /**
     * 设备编号
     */
    @TableField("device_no")
    private String deviceNo;

    /**
     * 设备名称
     */
    @TableField("device_name")
    private String deviceName;

    /**
     * 设备型号规格
     */
    @TableField("device_model")
    private String deviceModel;

    /**
     * 设备厂家
     */
    @TableField("device_manufacturer")
    private String deviceManufacturer;

    /**
     * 生产日期
     */
    @JsonFormat(timezone = "GMT+8",pattern = "yyyy-MM-dd")
    @DateTimeFormat(pattern="yyyy-MM-dd")
    @TableField("produce_time")
    private LocalDate produceTime;

    /**
     * 使用日期
     */
    @JsonFormat(timezone = "GMT+8",pattern = "yyyy-MM-dd")
    @DateTimeFormat(pattern="yyyy-MM-dd")
    @TableField("device_use_time")
    private LocalDate deviceUseTime;


    /**
     * 购置日期
     */
    @JsonFormat(timezone = "GMT+8",pattern = "yyyy-MM-dd")
    @DateTimeFormat(pattern="yyyy-MM-dd")
    @TableField("purchase_time")
    private LocalDate purchaseTime;

    /**
     * 精度等级
     */
    @TableField("accuracy_grade")
    private String accuracyGrade;

    /**
     * 设备数量
     */
    @TableField("device_num")
    private String deviceNum;

    /**
     * 设备状况
     */
    @TableField("device_condition")
    private String deviceCondition;

    /**
     * 部门
     */
    @TableField("org_no")
    private String orgNo;

    /**
     * 设备备注
     */
    @TableField("device_notes")
    private String deviceNotes;

    /**
     * 原值
     */
    @TableField("original_value")
    private String originalValue;
    /**
     * 鉴定周期
     */
    @TableField("identify_cycle")
    private String identifyCycle;
    /**
     * 鉴定日期
     */
    @JsonFormat(timezone = "GMT+8",pattern = "yyyy-MM-dd")
    @DateTimeFormat(pattern="yyyy-MM-dd")
    @TableField("identify_time")
    private LocalDate identifyTime;


    @Override
    protected Serializable pkVal() {
        return this.keyId;
    }

}
